// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import VueResource from 'vue-resource'
import 'element-ui/lib/theme-chalk/index.css'


// require('src/util/mock.js'); //引入mock数据，关闭则注释该行
// require('./util'); //引入mock数据，关闭则注释该行
// require('@/util'); //引入mock数据，关闭则注释该行
// Module not found: Error: Can't resolve '@/util' in
// 目录 不行

// require('src/util'); //引入mock数据，关闭则注释该行
// import Mock from 'src/util/mock.js';
// import Mock from './util';

// import router from './router'
// console.log("Mock")
// console.log(Mock)

// require('@/util/mock.js');
// 突然就可以 require了，可能之前写法都不对
// 要写 @  才行吗

import ImageViewer from 'vue2-viewer';
Vue.use(ImageViewer);

// import Vue from 'vue';
// import Viewer from 'v-viewer'
// import 'viewerjs/dist/viewer.css'

// const ip = '139.196.8.79'
// const ip = '139.196.8.79'
const ip = 'localhost'
// const port = '8889'
const port = '7001'
export const axiosUrl = `http://${ip}:${port}/`

Object.assign(Vue.prototype, { // vue的原型合并axios和axiosUrl
  // _ajax: axios,
  _api: axiosUrl
})

import VueCookies from 'vue-cookies';

Vue.use(VueCookies)

import axios from 'axios'
Vue.prototype.$axios = axios

Vue.config.productionTip = false;
Vue.use(ElementUI)
Vue.use(VueResource)

// new Vue({
//   components: {
//     VueMarkdown
//   }
// })

// import VueMarkdown from 'vue-markdown'
/* eslint-disable no-new */
// Vue.use(VueMarkdown)
// 这里user 没有用处
// const QuickVue={
//   Github:"Github",
// // }
// console.log("VueMarkdown")
// console.log(VueMarkdown)
new Vue({
  el: '#app',
  router,
  // components: { App,
  //   VueMarkdown},
  // components: { App,
  //   'vue-markdown': VueMarkdown
  // },

  components: { App},
  template: '<App/>'
})
